public class ThreadLocalTest {
	ThreadLocal<String> comments = new ThreadLocal<String>() {
		protected String initialValue() {
			return "";
		}
	};

	public void apendComments(String s) {
		comments.set(comments.get() + s);
	}

	public String getComments() {
		return comments.get();
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ThreadLocalTest tlt = new ThreadLocalTest();
		tlt.apendComments("abc");
		tlt.apendComments("123");
		tlt.apendComments("def");
		tlt.apendComments("456");
		System.out.println(tlt.getComments());
	}

}
